﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

// 普通攻击
public class SkillLogicNormalAttack : SkillLogicBase
{
    protected override void initTimeLine()
    {
        _timeLine.AddEvent(0, 0, onSkillStart);
        _timeLine.AddEvent(0, 11, onAni); // 播动画
        // 直接造成伤害
        _timeLine.AddEvent(0.42192f, 1, onHit);
        // 恢复到idle状态
        _timeLine.AddEvent(1.0f, 11, onAniEnd);
        // 音效
        _timeLine.AddEvent(1.0f, 0, onSkillEnd);
    }

    private void onHit(int __null)
    {
        // 攻击者；被攻击者
        // 对敌人造成伤害
        DamageMgr.Instance.PhysicsDamage(_owner, _curTarget, _skillObject);
    }

}

